//
//  UIView+MMAdd.h
//  oc_demo
//
//  Created by haigui on 2021/8/5.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIView (MMAdd)

@property (nonatomic, assign) CGFloat x;
@property (nonatomic, assign) CGFloat left;

@property (nonatomic, assign) CGFloat y;
@property (nonatomic, assign) CGFloat top;

@property (nonatomic, assign) CGFloat maxX;
@property (nonatomic, assign) CGFloat right;

@property (nonatomic, assign) CGFloat maxY;
@property (nonatomic, assign) CGFloat bottom;

@property (nonatomic, assign) CGFloat width;

@property (nonatomic, assign) CGFloat height;

@property (nonatomic, assign) CGFloat centerX;

@property (nonatomic, assign) CGFloat centerY;

///添加点击事件
- (void)addTapGestureWithBlock:(void(^)(void))block;
///设置指定角为圆角
- (void)setRoundCornersIn:(UIRectCorner)corners cornerRadii:(CGSize)cornerRadii;

/// 获取当前view所在的控制器
@property (nonatomic,strong) UIViewController *viewController;

@end

NS_ASSUME_NONNULL_END
